<html>
<head>
    <link href="/static/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="/static/css/bootstrap-responsive.min.css" rel="stylesheet">
    <script src="/static/js/jquery-latest.js"></script>
    <script src="/static/js/bootstrap.min.js"></script>
    <script src="/static/js/moment-with-locales.min.js"></script>
    <script>
        moment.defineLocale('zh', {
             parentLocale: 'zh-cn',
             /* */
        });
        moment.locale("{{g.locale}}");
    </script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	{% if title %}
	<title>{{title}} - microblog</title>
	{% else %}
	<title>microblog</title>
	{% endif %}
</head>
<body>
<div class="container">
    <div class="navbar">
        <div class="navbar-inner">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <a class="brand" href="/">microblog</a>
            <ul class="nav">
                <li><a href="{{url_for('index')}}">{{_('Home')}}</a></li>
                {% if g.user.is_authenticated %}
                <li><a href="{{url_for('user', nickname=g.user.nickname)}}">{{_('Your Profile')}}</a></li>
                <li><a href="{{url_for('logout')}}">{{_('Logout')}}</a></li>
                {% endif %}
            </ul>
            <div class="nav-collapse collapse">
                {% if g.user.is_authenticated %}
                <form class="navbar-search pull-right" action="{{url_for('search')}}" method="post" name="search">
                    {{g.search_form.hidden_tag()}}
                    {{g.search_form.search(size=20,placeholder="Search",class="search-query")}}
                </form>
                {% endif %}
            </div>
        </div>
    </div>
    <div class="row">
        <div class="span12">
            {% block content %}{% endblock %}
        </div>
    </div>
</div>
</body>
</html>